package com.qqtech.qquan.mall.dao;

import java.util.List;

import com.qqtech.core.frame.dao.BaseDao;
import com.qqtech.qquan.homemaking.model.HomemakingOrder;
import com.qqtech.qquan.mall.model.MallCategory;
import com.qqtech.qquan.mall.model.MallCategoryVo;

public interface MallCategoryDao extends BaseDao<MallCategory> {
	
	/**
	 * 获取oidx的最大值
	 * @param mallCategory
	 * @return
	 */
	public Integer getMaxOidx(MallCategory mallCategory);
	
	/**
	 * 获取categoryId的所有上级分类
	 * @param categoryId
	 * @return
	 */
	public List<MallCategoryVo> findAllParent(String categoryId);
	
	/**
	 * 根据分类id获取
	 * @param categoryId 分类id
	 * @return
	 */
	public MallCategoryVo getByCategoryId(String categoryId);
	
	/**
	 * 更新
	 * @param entity
	 * @return
	 */
	public int updateByCategoryId(MallCategory entity);
	
	/**
	 * 删除
	 * @param categoryId
	 * @return
	 */
	public int deleteByCategoryId(String categoryId);
}
